<?php use_stylesheets_for_form($form) ?>
<?php use_javascripts_for_form($form) ?>
<script>
jQuery(function ($) {
    $('#formulario .btn').click(function (e) {
        $.get("<?php echo url_for('banda/new');?>",function(data){
            // create a modal dialog with the data
            $(data).modal({
                onOpen: function (dialog) {
                    dialog.overlay.fadeIn('fast', function () {
                        dialog.container.slideDown('fast', function () {
                            dialog.data.fadeIn('fast');
                        });
                    });
                },
                onClose: function (dialog) {
                    dialog.container.slideUp('slow', function () {
                        dialog.overlay.fadeOut('slow', function () {
                            $.modal.close(); // must call this!
                        });
                    });
                }
            });
        });
    });
});
</script>
<form  id="formulario" action="<?php echo url_for('clienteNatural/'.($form->getObject()->isNew() ? 'create' : 'update').(!$form->getObject()->isNew() ? '?cedula='.$form->getObject()->getCedula() : '')) ?>" method="post" <?php $form->isMultipart() and print 'enctype="multipart/form-data" ' ?>>
    <?php if (!$form->getObject()->isNew()): ?>
    <input type="hidden" name="sf_method" value="put" />
    <?php endif; ?>
    <table >
        <tfoot>
            <tr>
                <td colspan="2">
                    <input type='button' value='Nueva banda' class="btn" />
                    &nbsp;<input type="button" class="btn blue" id="botonVolver"
                                 onClick="location.href='<?php echo url_for('clienteNatural/index') ?>'" value="Volver"/>
                                 <?php if (!$form->getObject()->isNew()): ?>
                    &nbsp;<?php echo link_to('Eliminar', 'clienteNatural/delete?cedula='.$form->getObject()->getCedula(),'class=btn red', array('method' => 'delete', 'confirm' => 'Esta seguro que quiere realizar esta operacion?')) ?>
                    <?php endif; ?>
                    <input type="submit" class="btn green" value="Confirmar" />
                </td>

            </tr>
        </tfoot>
        <tbody>
            <?php echo $form ?>
        </tbody>
    </table>
</form>